package com.kcsj.demo.Mapper;

import com.kcsj.demo.Module.Main;
import com.kcsj.demo.Module.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import javax.xml.ws.soap.MTOM;
import java.util.List;

@Mapper
public interface ProductMapper {
    @Insert("insert into product(product_name,product_price,product_supplier) values(#{productName},#{productPrice},#{productSupplier})")
    public void insert(Product product);

    @Select("select * from product")
    List<Product> list();

    @Delete("delete from product where product_name=#{productName}")
    public void delete(String productName);
}